<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.db.conn"%>
<%@ page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>
    <style>
        .ms-panel {
            margin: 0;
            padding: 0;
            background: #fff;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.12);
        }
        
        .ms-panel-header {
            padding: 20px 24px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ms-panel-header h6 {
            margin: 0;
            font-size: 18px;
            font-weight: 500;
            color: #333;
        }
        
        .ms-panel-body {
            padding: 24px;
        }
        
        .detail-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .detail-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .detail-table td {
            padding: 16px;
            border-bottom: 1px solid #eee;
        }
        
        .detail-table td:first-child {
            width: 120px;
            color: #666;
            font-weight: 500;
            text-align: right;
            padding-right: 24px;
            background: #f8f9fa;
        }
        
        .detail-table td:last-child {
            color: #333;
            text-align: left;
            font-size: 15px;
        }
        
        .detail-title {
            font-size: 16px;
            font-weight: 500;
            color: #333;
        }
        
        .detail-content {
            line-height: 1.6;
            color: #333;
            font-size: 15px;
        }
        
        .detail-time {
            color: #6c757d;
            font-size: 14px;
        }
        
        .action-row {
            text-align: center;
            padding-top: 24px;
        }
        
        .btn-return {
            display: inline-flex;
            align-items: center;
            padding: 8px 24px;
            background: #007bff;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            text-decoration: none;
        }
        
        .btn-return:hover {
            background: #0056b3;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .btn-return:before {
            content: "←";
            margin-right: 8px;
            font-size: 16px;
        }
    </style>
</head>

<body class="ms-body ms-aside-left-open ms-primary-theme ms-has-quickbar">
    <div class="ms-content-wrapper">
        <div class="row">
            <div class="col-md-12">
                <div class="ms-panel">
                    <div class="ms-panel-header">
                        <h6>查看通知公告信息</h6>
                    </div>
                    <div class="ms-panel-body">
                        <div class="detail-container">
                            <%
                                conn cn = new conn();
                                String id = request.getParameter("id");
                                String sql = "select * from placard where pid=" + id;
                                ResultSet rs = cn.query(sql);
                                rs.next();
                            %>
                            
                            <table class="detail-table">
                                <tr>
                                    <td>标题</td>
                                    <td class="detail-title"><%=rs.getString("ptitle") %></td>
                                </tr>
                                <tr>
                                    <td>内容</td>
                                    <td class="detail-content"><%=rs.getString("pmemo") %></td>
                                </tr>
                                <tr>
                                    <td>发布时间</td>
                                    <td class="detail-time"><%=rs.getString("ptime") %></td>
                                </tr>
                            </table>
                            
                            <div class="action-row">
                                <a href="javascript:history.go(-1);" class="btn-return">返回</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <%
        if(rs != null) rs.close();
        if(cn != null) cn.close();
    %>
</body>
</html>


